package com.yunshang.shoppingmall.service.impl;

import com.yunshang.shoppingmall.entity.Ewm;
import com.yunshang.shoppingmall.mapper.EwmMapper;
import com.yunshang.shoppingmall.service.EwmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("ewmService")
public class EwmServiceImpl implements EwmService {

    @Autowired
    EwmMapper ewmMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return 0;
    }

    //保存二维码分享图链接
    @Override
    public int insert(Ewm record) {
        return ewmMapper.insert(record);
    }

    @Override
    public int insertSelective(Ewm record) {
        return ewmMapper.insertSelective(record);
    }

    @Override
    public Ewm selectByPrimaryKey(Integer id) {
        return ewmMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Ewm record) {
        return 0;
    }

    @Override
    public int updateByPrimaryKey(Ewm record) {
        return 0;
    }

    @Override
    public List<Ewm> selectByProductId(int productId) {
        return ewmMapper.selectByProductId(productId);
    }

    @Override
    public List<Ewm> selectEWMList() {
        return ewmMapper.selectEWMList();
    }
}
